package one.stand.controller;

import lombok.extern.slf4j.Slf4j;
import one.stand.model.ResultModel;
import one.stand.request.SwitchVideoRequest;
import one.stand.request.UserCouponRequest;
import one.stand.service.VideoSwtichService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * @author luoyang
 * @date 2020/6/15 10:31
 */
@RestController
@RequestMapping("video")
@Slf4j
public class VideoSwtichController {

    @Autowired
    private VideoSwtichService videoSwtichService;
    /**
     * 按公司查询视频开关状态
     * @param request
     * @return
     */
    @PostMapping("switchVideo")
    public ResultModel switchVideo(@RequestBody @Valid SwitchVideoRequest request){
        log.info("switchVideo:{}",request);
        return videoSwtichService.switchVideo(request);
    }
}
